package net.zhengxinyun.performance.service.login;

import net.zhengxinyun.performance.entity.MenuLists;
import net.zhengxinyun.performance.entity.RolePerEntity;
import net.zhengxinyun.performance.filter.RolePerFilter;
import net.zhengxinyun.performance.mapper.login.RolePerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RolePerServiceImpl implements RolePerService {

    @Autowired
    private RolePerMapper roleMapper;











    @Override
    public int deleteByPrimaryKey(Long id) {
        return roleMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(RolePerEntity record) {
        return roleMapper.insert(record);
    }

    @Override
    public int insertSelective(RolePerEntity record) {
        return roleMapper.insertSelective( record);
    }

    @Override
    public RolePerEntity selectByPrimaryKey(Long id) {
        return roleMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(RolePerEntity rolePerEntity) {
        return roleMapper.updateByPrimaryKeySelective( rolePerEntity);
    }

    @Override
    public int updateByPrimaryKey(RolePerEntity record) {
        return roleMapper.updateByPrimaryKey( record);
    }

    @Override
    public List<RolePerFilter> query(RolePerFilter rolePerEntity) {
        return roleMapper.query(rolePerEntity);
    }

    @Override
    public Integer queryForCount(RolePerFilter rolePerEntity) {
        return roleMapper.queryForCount( rolePerEntity) ;
    }

    @Override
    public RolePerFilter selectUserRight(Long id) {
        return roleMapper.selectUserRight(id);
    }

    @Override
    public MenuLists getMenus(String code) {



        return  roleMapper.getMenus(code);
    }
}
